package com.cn.sys.frame.db.dialect;

public class OracleDialect extends Dialect {

	public String getLimitSql(String sql, long offerStart, int size) {
		StringBuffer pageBuffer = new StringBuffer();
		pageBuffer.append("SELECT * FROM (SELECT TEMP_.*,ROWNUM NUM_ FROM (").append(sql)
		.append(") TEMP_ WHERE ROWNUM <=").append(offerStart+size)
		.append(") WHERE NUM_ > ").append(offerStart);
		return pageBuffer.toString();
	}

}
